package com.fourth.shopping.controller;


import com.fourth.shopping.entity.Cart;
import com.fourth.shopping.service.CartService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/cart")
public class CartController {

    @Resource
    CartService cartService;

    @GetMapping("/getCart.do")
    public List<Cart> getCart(String userId){
        return cartService.getAllCart(userId);
    }

}
